﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using SmartAssembly;

namespace Tests
{
    [TestFixture]
    public sealed class ReportUtilsTests
    {
        private static readonly string[] s_ExceptionTypes =
            new[]
                {
                    @"[SharpSvn]SharpSvn.SvnEntryNotFoundException",
                    @"System.Runtime.InteropServices.InvalidOleVariantTypeException",
                    @"System.ArgumentNullException",
                    @"System.MissingFieldException",
                    @"[Mono.Cecil]Mono.Cecil.UnexpectedNullParameterTypeException",
                    @"[NHibernate]NHibernate.StaleObjectStateException",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ClrMetaData.ClrAssemblyComparerException",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Client.Exceptions.RpcNoResultException",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.InvalidStateException",
                    @"[Microsoft.SqlServer.Management.UI.RSClient]Microsoft.SqlServer.ReportingServices.ReportServiceDetailsException",
                    @"[System]System.Net.WebException",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.SqlCompareException",
                    @"[Quartz]Quartz.ObjectAlreadyExistsException",
                    @"[System]System.ComponentModel.Win32Exception",
                    @"N/A",
                    @"System.ApplicationException",
                    @"[RedGate.Reflector.Addin]RedGate.Reflector.Addin.Logging.LogServiceInitialisationFailureException",
                    @"System.Runtime.Remoting.RemotingException",
                    @"[System]System.UriFormatException",
                    @"[Mono.Cecil]Mono.Cecil.ReflectionException",
                    @"[Quartz]Quartz.SchedulerException",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Exceptions.CouldNotMapFileException",
                    @"System.BadImageFormatException",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Exceptions.CannotStartSessionException",
                    @"System.DllNotFoundException",
                    @"[unknown type from RedGate.Profiler.Engine]",
                    @"[SharpSvn]SharpSvn.SvnFileSystemException",
                    @"System.NullReferenceException",
                    @"System.Runtime.InteropServices.SEHException",
                    @"System.IO.EndOfStreamException",
                    @"[RedGate.Reflector.Tools]RedGate.Reflector.Tools.DeleteAccessPermission",
                    @"System.NotImplementedException",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Exceptions.BadLogBlockException",
                    @"System.ArgumentException",
                    @"[NHibernate]NHibernate.InstantiationException",
                    @"[NHibernate]NHibernate.NonUniqueResultException",
                    @"[SharpSvn]SharpSvn.SvnObstructedUpdateException",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.InvalidRepositoryPathException",
                    @"System.Reflection.AmbiguousMatchException",
                    @"System.Runtime.InteropServices.InvalidComObjectException",
                    @"[Mono.Cecil]Mono.Cecil.Metadata.MetadataFormatException",
                    @"System.Security.Cryptography.CryptographicException",
                    @"System.IO.PathTooLongException",
                    @"System.Runtime.InteropServices.ExternalException",
                    @"[Microsoft.TeamFoundation.VersionControl.Client]Microsoft.TeamFoundation.VersionControl.Client.CheckinException",
                    @"[System]System.Security.Authentication.AuthenticationException",
                    @"System.Threading.AbandonedMutexException",
                    @"[NHibernate]NHibernate.ADOException",
                    @"System.FormatException",
                    @"System.Runtime.InteropServices.MarshalDirectiveException",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.ClientJavascriptException",
                    @"[System]System.IO.InvalidDataException",
                    @"[System.Data]System.Data.SqlClient.SqlException",
                    @"System.IO.IOException",
                    @"System.Runtime.Serialization.SerializationException",
                    @"[NHibernate]NHibernate.TransactionException",
                    @"[NHibernate]NHibernate.Exceptions.GenericADOException",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.RecoveryFailureException",
                    @"[RedGate.SQLSourceControl.CommonUI]RedGate.SQLSourceControl.CommonUI.Controls.CancellableCoverControl",
                    @"[Microsoft.TeamFoundation.VersionControl.Client]Microsoft.TeamFoundation.VersionControl.Client.MappingConflictException",
                    @"System.Collections.Generic.KeyNotFoundException",
                    @"System.NotSupportedException",
                    @"[RedGate.SQLDiscover.Addin]RedGate.SQLDiscover.Addin.Indexing.DatabaseUnavailableException",
                    @"[System.Xml]System.Xml.XmlException",
                    @"[SmartAssembly]SmartAssembly.PleaseRetryAndReportThisException",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException",
                    @"[SharpSvn]SharpSvn.SvnException",
                    @"System.IO.FileLoadException",
                    @"[System]System.ComponentModel.LicenseException",
                    @"System.IO.IsolatedStorage.IsolatedStorageException",
                    @"System.InvalidCastException",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ReadFromBackup.SQLBackupReaderLoadException",
                    @"[Microsoft.TeamFoundation.VersionControl.Client]Microsoft.TeamFoundation.VersionControl.Client.VersionControlException",
                    @"[System.Web.Services]System.Web.Services.Protocols.SoapException",
                    @"System.SystemException",
                    @"[Microsoft.VisualStudio.Shell.UI.Internal]Microsoft.VisualStudio.PlatformUI.Automation.DeprecatedException",
                    @"[RedGate.SQLCompare.ASTParser]antlr.TokenStreamRecognitionException",
                    @"System.TypeLoadException",
                    @"System.Threading.ThreadStateException",
                    @"System.UnauthorizedAccessException",
                    @"System.EntryPointNotFoundException",
                    @"[Ninject.Core]Ninject.Core.ActivationException",
                    @"[SmartAssembly]SmartAssembly.InformationException",
                    @"[System]System.Net.Sockets.SocketException",
                    @"[SharpSvn]SharpSvn.SvnAuthorizationException",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.Indexes",
                    @"System.Reflection.TargetParameterCountException",
                    @"System.TypeInitializationException",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Pickle.ParseException",
                    @"System.IO.FileNotFoundException",
                    @"[SmartAssembly]SmartAssembly.PleaseReportThisException",
                    @"[SharpSvn]SharpSvn.SvnRepositoryHookException",
                    @"System.Resources.MissingManifestResourceException",
                    @"System.ExecutionEngineException",
                    @"System.IO.DirectoryNotFoundException",
                    @"System.Security.XmlSyntaxException",
                    @"[RedGate.Licensing.Client]RedGate.Licensing.Client.ActivationException",
                    @"[unknown type from RedGate.Memory.Engine]",
                    @"System.Security.VerificationException",
                    @"System.Exception",
                    @"System.ArgumentOutOfRangeException",
                    @"[System.Web]System.Web.HttpException",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Client.Exceptions.RpcServerVersionException",
                    @"System.Security.SecurityException",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Perfmon.Sampling.PerfSamplingException",
                    @"[SharpSvn]SharpSvn.SvnRepositoryIOException",
                    @"[System.Data.SQLite]System.Data.SQLite.SQLiteException",
                    @"System.Reflection.TargetInvocationException",
                    @"System.ObjectDisposedException",
                    @"[Microsoft.TeamFoundation.Common]Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException",
                    @"System.IndexOutOfRangeException",
                    @"System.OverflowException",
                    @"System.MissingMemberException",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ReadFromFolder.ErrorsOccuredDuringScriptFileParsingException",
                    @"[System.Web]System.Web.HttpRequestValidationException",
                    @"[Microsoft.TeamFoundation.VersionControl.Client]Microsoft.TeamFoundation.VersionControl.Client.ItemNotMappedException",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Exceptions.BadLogFileException",
                    @"System.InvalidProgramException",
                    @"System.InvalidOperationException",
                    @"[C5]C5.NoSuchItemException",
                    @"[SharpSvn]SharpSvn.SvnFileSystemOutOfDateException",
                    @"[RedGate.Profiler.SharedUI]RedGate.Profiler.SharedUI.Graph.Printing.PrintFormStrings",
                    @"System.Reflection.ReflectionTypeLoadException",
                    @"[System.DirectoryServices]System.DirectoryServices.ActiveDirectory.ActiveDirectoryServerDownException",
                    @"[unknown exception]",
                    @"System.AccessViolationException",
                    @"System.OutOfMemoryException",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.ConflictException",
                    @"[SharpSvn]SharpSvn.SvnInvalidNodeKindException",
                    @"System.MissingMethodException",
                    @"[System.Configuration]System.Configuration.ConfigurationErrorsException",
                    @"System.Runtime.InteropServices.COMException",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.IIS.IISException",
                    @"[RedGate.Shared.Utils]RedGate.Shared.Utils.IO.Serialization.SerializationInvalidVersionException",
                };

        private static readonly string[] s_MethodNames =
            new[]
                {
                    @"private void CacheAllPodFiles();",
                    @"private void TooletForm_FormClosed(object sender, FormClosedEventArgs e);",
                    @"private void LoadCache(ProjectDocument document);",
                    @"private void CreateControl(IControl control, IDynControl dynamicControl, ColumnType column);",
                    @"internal static bool DoesFileExistsOrHasBeenMigrated(string fileName, string oldFileName);",
                    @"internal IController GetControllerInstance(RequestContext requestContext, Type controllerType);",
                    @"public ISessionManager Activate();",
                    @"public ITrigger LaunchTrigger(TriggerFlags flags);",
                    @"private void Method3(Class1 grr);",
                    @"Method3(Class1 grr)",
                    @"?(? grr) in C:\Users\alex.davies\Documents\Visual Studio 2008\Projects\WindowsFormsApplication3\LoginForm.cs:line 36",
                    @"private void AddFileOrDirectory(string path);",
                    @"private void ProcessAssemblyDeps();",
                    @"private void SyncToScriptBuildBuildDBPermissionsAlter(Options options, ProgressTracker progressTracker, ScriptDatabaseInformation dbInfo, Database targetDatabase);",
                    @"public void <Commit>b__36();",
                    @"button1_Click(Object sender, RoutedEventArgs e)",
                    @"internal void Dispose(bool disposing);",
                    @"private long GetLocalRevision(string path);",
                    @"private void ProcessFile(FileInfo file);",
                    @"public void <.ctor>b__0();",
                    @"public ActionResult ShowAlertDetails(long alertId);",
                    @"private PerfObjectSetInstance SamplePerfObjectsMatchingQuery(IStatusLogger statusLogger, string query, IEnumerable`1<System.String> requiredObjectNames);",
                    @"private Command FindCommandForButton(CommandBarButton button);",
                    @"private static object GetConstantValue(Constant c);",
                    @"private static void Insert(SqlTransaction transaction, DataTable dataTable);",
                    @"public void DeleteEarlier(QualifiedChannelName channelName, DateTime purgeDate);",
                    @"private long InsertChannelKey(SqlTransaction transaction, QualifiedChannelName qualifiedChannelName, PropertyMap`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Properties.PropertySchema> propertySchemas, Option`1<System.Int64> ",
                    @"public object ExecuteScalar(SqlCommand command);",
                    @"public static void WriteToServerFast(SqlBulkCopy sqlBulkCopy, SqlTransaction transaction, DataTable dataTable);",
                    @"private void SearchConfigBarOnSearchRequested(object sender, EventArgs args);",
                    @"public ActionResult NetworkData(string machineName, Nullable`1<valuetype [mscorlib]System.DateTime> date);",
                    @"public ActionResult MachineData(string machineName, Nullable`1<valuetype [mscorlib]System.DateTime> date);",
                    @"public ActionResult SqlServerData(string machineName, Nullable`1<valuetype [mscorlib]System.DateTime> date);",
                    @"internal Uri get_RepositoryUrl();",
                    @"public NHibernateUnitOfWork(ISession session);",
                    @"private Dictionary`2<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Names.QualifiedChannelName><class [Iesi.Collections]Iesi.Collections.Generic.ISet`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.Cluster>",
                    @"public Channel Query(Unit queryContext, IStatusLogger statusLogger, ChannelTree`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.PropertyMap`1<class [RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Functional.",
                    @"public void Commit();",
                    @"private static IEnumerable`1<!!0> GetAll(ICriteria criteria);",
                    @"public object CallMethod(string serviceName, MethodInfo method, object[] args);",
                    @"private void SyncToScriptBuildSchemaObjectAuthorizationAlters(Options options, ProgressTracker progressTracker, Database targetDatabase, ScriptDatabaseInformation dbInfo);",
                    @"WinIOError(Int32 errorCode, String maybeFullPath)",
                    @"public PerfObjectSetInstance SamplePerfObjects(IStatusLogger statusLogger, IEnumerable`1<System.String> objectNames);",
                    @"public MachineOverviewDataModel(_Cluster machine, DateTime minDate, DateTime maxDate);",
                    @"public static string GetFullPath(IDatabaseObject dbObject);",
                    @"public SqlInstanceOverviewDataModel(_Cluster machine, _SqlServer sqlInstance, DateTime minDate, DateTime maxDate);",
                    @"public static DateTime Min(DateTime a0, DateTime r0, DateTime r1);",
                    @"private static !!0 GetByName(ICriteria criteria, string name);",
                    @"public JsonResult RemoveEntity(string[] fullyQualifiedNames, bool deleteAllAssociatedData);",
                    @"private static void BulkCopy(SqlConnection connection, IDictionary`2<class [RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Sql.SqlTableIdentifier><class [System.Data]System.Data.DataTable> tableNameToDataTable);",
                    @"public Image b(string );",
                    @"public SqlInstanceRowModel(_Cluster machine, _SqlServer sqlServer, string url, DateTime minDate, DateTime maxDate);",
                    @"public ActionResult NetworkData(string machineName, string sqlServerName, Nullable`1<valuetype [mscorlib]System.DateTime> date);",
                    @"public static IDataCollectionEngine GetDataCollectionEngine();",
                    @"public SqlDataReader ExecuteReader(SqlCommand command);",
                    @"private void InsertOrUpdateChannelInstanceOrSample(bool isInsert, SqlTransaction transaction, QualifiedChannelName qualifiedChannelName, DataTableKind dataTableKind, Option`1<System.Int64> channelKeyIdOrNone, DateTime collectionDate, PropertyMap`1<class [",
                    @"public ThreeWayDiff <BuildWithNoopResolution>b__3();",
                    @"/MachineOverview/ProcessData:line 0",
                    @"public void <VerifyConnection>b__0();",
                    @"GetConnection(DbConnection owningObject)",
                    @"public void Delete(MonitoredEntity monitoredEntity);",
                    @"private long PerformUpgrade(PathSet paths, SvnRevision revision, SvnDepth svnDepth, EventHandler`1<class [SharpSvn]SharpSvn.SvnNotifyEventArgs> notifyEventHandler, EventHandler`1<class [SharpSvn]SharpSvn.SvnConflictEventArgs> conflictEventHandler);",
                    @"public !0 <ExecuteCommand>b__3();",
                    @"private long GetOrInsertChannelKey(SqlConnection connection, QualifiedChannelName qualifiedChannelName, PropertyMap`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Properties.PropertySchema> propertySchemas, Option`1<System.Int6",
                    @"private void AddPropertyValue(PropertyKind propertyKind, PropertyName propertyName, DateTime collectionDate, Option`1<!!0> valueOrNone);",
                    @"FindView(ControllerContext context)",
                    @"public void RemoveAndDisposeLinkedDatabase(IDatabaseId databaseId);",
                    @"public JsonResult GraphData(string machineCir, string sqlInstanceCir, DateTime date);",
                    @"public void Dispose();",
                    @"public void UnscheduleJobGroup(string groupName);",
                    @"public string GetIdentity(string location);",
                    @"private void <Commit>b__3(string dbFileName);",
                    @"public ActionResult LogicalDiskData(string machineName, string sqlServerName, Nullable`1<valuetype [mscorlib]System.DateTime> date);",
                    @"private Option`1<System.String> GetSqlJobName(ChannelInstanceRef channelInstanceRef);",
                    @"public BaseMonitorConnection(ProxyGenerator proxyGenerator, IUtcDateTimeProvider utcDateTimeProvider, X509Certificate certificate, BaseMonitorLocation location);",
                    @"public ValueStream Evaluate(ValueStream previousFoldedValueStream, ValueStream previousRawValueStream, ValueStream rawValueStream);",
                    @"public TimeRange(DateTime minDate, DateTime maxDate);",
                    @"private static !0 <.cctor>b__d4();",
                    @"public void <SyncToLive>b__c();",
                    @"private static void BulkCopy(SqlConnection connection, IEnumerable`1<valuetype [mscorlib]System.Collections.Generic.KeyValuePair`2<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Names.QualifiedChannelName><class [System.Data]Syst",
                    @"public int ExecuteNonQuery(SqlCommand command);",
                    @"DoBeginAccept(Socket acceptSocket, Int32 receiveSize, AcceptOverlappedAsyncResult asyncResult)",
                    @"public RegistryKey <OpenSubKeyOrNoneImplementation>b__a();",
                    @"public void Check();",
                    @"private static byte[] GetBlobBytesFromString(string s);",
                    @"private static PerfObject ParseInstanceDefinitionToGetParentObject(Stream stream, PerfNameLookup nameLookup, IDictionary`2<System.String><class [RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Perfmon.PerfObject> objectName",
                    @"private void MergeInstance(SqlConnection connection, QualifiedChannelName qualifiedChannelName, ChannelTree`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.PropertyMap`1<class [RedGate.Response.Common.Utilities]RedGate.Response.",
                    @"private long GetOrInsertChannelKey(SqlConnection connection, Option`1<System.Int64> parentChannelKeyIdOrNone, ChannelInstanceRef channelInstanceRef, DateTime collectionDate, bool&  newChannelKey);",
                    @"Begin(IsolationLevel isolationLevel)",
                    @"CheckDisposed()",
                    @"private void DetectSqlAddress(ISqlServerProvider provider, IStatusLogger statusLogger);",
                    @"internal void OnActiveItemChanged(EventArgs e);",
                    @"internal IMemberReference ReadMemberReference(int token, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod);",
                    @"N/A",
                    @"CheckSuspiciousPhysicalPath(String physicalPath)",
                    @"BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)",
                    @"GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)",
                    @"internal IType ReadTypeOrTypeReference(int token, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod);",
                    @"public void <GetPhysicalRootQuery>b__4(Expr physicalExpr, Option`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.PropertyRestriction> propertyRestrictionOrNone);",
                    @"public IEnumerable`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.PropertyMap`1<System.Object>> SampleProperties(IStatusLogger statusLogger, !0 state, IEnumerable`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.",
                    @"internal ChannelInstanceData(DateTime minCollectionDate, PropertyMap`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.ValueStreams.ValueStream> valueStreams);",
                    @"public IList`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.RedGateLicenceAllocation> GetRedGateLicenseAllocation(Guid machineId);",
                    @"private Option`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.Alert.Configuration.AlertConfig> GetSingleLevelAlertConfiguration(AlertType alertType, QualifiedChannelName group, ChannelInstanceRef channelInstanceRef);",
                    @"public QualifiedChannelName Sub(ChannelName channelName);",
                    @"public Option`1<System.Object> <GetValueOrNoneImplementation>b__3();",
                    @"public static string GetSelectPropertiesAndKeysFromViewCommandText(QualifiedChannelName channelName, IEnumerable`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Names.PropertyName> propertyNames, ChannelTree`1<class [RedGate.Res",
                    @"private void AddLogicalChannelInstanceData(QualifiedChannelName logicalQualifiedChannelName, ChannelConfig channelConfig, Channel physicalRootChannel, ChannelInstanceRef physicalBijectionChannelInstanceRef, IDictionary`2<class [RedGate.Response.Common.Dom",
                    @"public MachineRowModel(_Cluster machine, string url, IEnumerable`1<class [RedGate.Response.UI.Website]RedGate.Response.UI.Website.Models.Overview.GlobalOverview.SqlInstanceRowModel> sqlInstances, DateTime minDate, DateTime maxDate);",
                    @"internal void Add(!0 value);",
                    @"private void Schedule(Trigger trigger, Action jobAction, string groupName, string jobName, DateTime startDate, int misfireInstruction);",
                    @"private static void RecursionLimit(object sender, RecursionEventArgs args);",
                    @"private static !!0 ExecuteCommand(string connectionString, string command, string parameterName, string parameterValue);",
                    @":line",
                    @"public ActionResult LogicalDiskData(string machineName, Nullable`1<valuetype [mscorlib]System.DateTime> date);",
                    @"public void MarkTokenAsNotObfuscatable(Token token);",
                    @"public bool Deserialize(int versionId, ISerializeFormatter formatter);",
                    @"public void AddComment(int[] alertIds, string authorName, string commentText);",
                    @"private static bool CheckVersionCompatible(Stream requestStream, Stream responseStream);",
                    @"public AsynchronousSocketListener(Action`1<class [mscorlib]System.IO.Stream> streamConsumer, int port, int backlog);",
                    @"private StatusModel GetSqlServerStatusModel(string machineName, string sqlServerName);",
                    @"private void DecodeNestedClassTable();",
                    @"public IEnumerable`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceRef> Merge(ChannelTree`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.PropertyMap`1<class [RedGate.Response.Commo",
                    @"private void InsertChannelInstanceIfRequired(SqlConnection connection, QualifiedChannelName qualifiedChannelName, Option`1<System.Int64> channelKeyIdOrNone, DateTime collectionDate, PropertyMap`1<System.Object> instancePropertyMap);",
                    @"public static AlertInstance ToAlertInstance(SqlDataReader row);",
                    @"internal !!0 Get(object[] ctorArgs);",
                    @"private void MoveMachine(ChannelInstanceRef itemChannelInstanceRef, QualifiedChannelName itemGroupName, QualifiedChannelName newParentGroupName);",
                    @"internal void Populate();",
                    @"public ActionResult Index(string version, string filePath);",
                    @"private void PopulateConstraints();",
                    @"HandleUnknownAction(String actionName)",
                    @"public IEnumerable`1<class [RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Functional.Tuple`2<System.String><class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.Alert.FilterOptions>> GetFilters();",
                    @"private static bool IsSingleUser(SqlCommand cmd);",
                    @"private void ReadChannelSampleProperties(IDictionary`2<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceRef><class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceDataBuild",
                    @"ValidateString(String s, String valueName, String collectionName)",
                    @"internal long GetOrInsertChannelKey(SqlConnection connection, long parentChannelKeyId, ChannelInstanceRef channelInstanceRef, DateTime collectionDate, bool&  newChannelKey);",
                    @"public IEnumerable`1<System.String> GetSubKeyNames(IStatusLogger statusLogger);",
                    @"public ChannelHolder`1<!0> GetSubChannelHolder(ChannelName subChannelName);",
                    @"public ClrAssemblyMetaData(byte[] assembly, ClrAssemblyMetaDataOptions options);",
                    @"private void __RenderContent3(HtmlTextWriter __w, Control parameterContainer);",
                    @"public void <GetOriginVersion>b__16();",
                    @"public void Prepare(Configuration configuration, ProjectPreparingFeedbackEventHandler feedback);",
                    @"internal IRawBlock CompressedBlockAtOffset(long offset);",
                    @"internal static Assembly (object, ResolveEventArgs);",
                    @"public Option`1<System.Object> GetValueOrNone(IStatusLogger statusLogger, string name);",
                    @"internal Token ReadToken(CodedIndexTypes codedIndexType);",
                    @"public static bool TryLoadFromIfExists(string dir, AssemblyName requestedAssemblyName, Assembly&  assembly);",
                    @"private static bool get_IsPrivileged();",
                    @"public void <CheckOut>b__10();",
                    @"private RegistryKey OpenRegistryKey(RegistryHive registryHive);",
                    @"public ActionResult ViewOne(long alertId);",
                    @"public ConstantExpr(PropertyType propertyType, string valueString);",
                    @"public void <Commit>b__2e();",
                    @"public static ReturnedSqlServerMessage ToReturnedSqlServerMessage(SqlServer sqlServer);",
                    @"http://10.151.1.14:8080/static/2.0.0.1994/Scripts/RedGate.Response.js:line 56",
                    @"public static byte[] Decrypt(byte[] encryptedBytes, byte[] Key, byte[] IV);",
                    @"public static void True(bool condition, string message);",
                    @"public bool IsLocal(string hostNameOrAddress);",
                    @"private void WriteExpression(IExpression value, IFormatter formatter);",
                    @"private static void GenericPersist(string fileName, string type, !!0 store);",
                    @"internal YGraphAdapter(IGraphDataModel model, bool onlyEdgesToOrFromSelection);",
                    @"http://10.151.1.14:8080/static/2.0.0.1988/Scripts/RedGate.Response.js:line 56",
                    @"http://10.151.1.14:8080/static/2.0.0.1987/Scripts/RedGate.Response.js:line 56",
                    @"private void __RenderContent4(HtmlTextWriter __w, Control parameterContainer);",
                    @"private void InsertChannelInstanceIfRequired(SqlConnection connection, QualifiedChannelName qualifiedChannelName, long channelKeyId, DateTime collectionDate, PropertyMap`1<System.Object> instancePropertyMap);",
                    @"http://127.0.0.1:8080/Alerts/Details/2598:line 92",
                    @"private bool CalculateWorkSetDependencyForToAssemblies(Differences differences, bool runOnTwo, bool doTriggers);",
                    @"public void AttachTo(int pid, IEnumerable`1<class [RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Attach.IAttachBlock> attachBlocks);",
                    @"private FilesToUpgrade GetFilesToUpgrade(ScriptSynchronizationActions scriptActions, Differences differences);",
                    @"CreateInstance(Type type, Boolean nonPublic)",
                    @"internal static ObjectType GetObjectType(IDatabaseObject databaseObject);",
                    @"private static void CheckCanCreateWithCommit(IList`1<System.String> paths);",
                    @"public void <WithTfs>b__0();",
                    @"private static string GetValue(string key);",
                    @"#fk(Exception , Object[] )",
                    @"public IExceptionHandlerCollection get_ExceptionHandlers();",
                    @"private static FileInfo[] GetScriptFolderFilesForCompare(IEnumerable`1<System.String> dataFileNames, string directory, long&  totalFileSize);",
                    @"public ConfirmationDialogController(IConfirmationDialog confirmationDialog);",
                    @"CreateInterfaceProxy(IInterfaceInvocationHandler invocationHandler, Type interfaceType, Boolean throwOnNonActorMethod)",
                    @"public object CreateInterfaceProxy(IInterfaceInvocationHandler invocationHandler, Type interfaceType, bool throwOnNonActorMethod);",
                    @"private static void BuildForwarderMethod(MethodBuilder methodBuilder, Type[] parameterTypes, MethodInfo toForwardToMethod, FieldInfo toForwardField);",
                    @"ctor(Int32 , Object[] , Int32 , Exception , Int32 )",
                    @"private static void OpenConnection(SqlConnection connection);",
                    @"internal void ExecuteNonQuery(string sql, object[] values);",
                    @"LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister)",
                    @"private LinkedList`1<class [RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceRef> MergeInstance(SqlConnection connection, long parentChannelKeyId, QualifiedChannelName qualifiedChannelName, ChannelTree`1<class [RedGate",
                    @"public !1 Invoke();",
                    @"public static !!0 Get();",
                    @"private static void CreateInternal(IModule[] testModules);",
                    @"public void <GetOriginVersion>b__15();",
                    @"private ThreeWayDiff GetThreeWayDiff(ICancellableOperationStatus status, IReadOnlySourceControlServerCallBacks sourceControlUserCallBacks);",
                    @"public void <SyncToLive>b__7();",
                    @"internal static IBackupConnection LiveConnection(SqlConnection sqlConn, SQLVersion version);",
                    @"private void PopulateObjectText(DBPopulationOptions popOptions, bool isForDataCompare);",
                    @"SafeCreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES securityAttrs, FileMode dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile)",
                    @"EndUpdate(Boolean synchronized)",
                    @"public static Uri ParseServerUrl(string serverUrl, string serverPort);",
                    @"internal static ILinkedDatabase CreateLinkedDatabaseWithCommit(ICancellableOperationStatus status, string logMessage, IDatabaseId databaseId, ISrcCLocation location, ISourceControlUserCallBacks callBacks);",
                    @"ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)",
                    @"private IExpression DecodeNullCoalescingExpression();",
                    @"public static string GetSilverlightUrl(Project project);",
                };

        private static readonly string[] s_TypeNames =
            new[]
                {
                    @"[RedGate.ScriptsManager.Engine]RedGate.POD.Engine.PodFilesSummary",
                    @"[RedGate.ScriptsManager.Runner]RedGate.ScriptsManager.Runner.TooletForm",
                    @"[RedGate.ScriptsManager.Engine]RedGate.POD.Engine.PodFileSummary",
                    @"[RedGate.ScriptsManager.Preset]RedGate.PodRunner.TooletForm",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.PersistenceManager",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.ManualControllerFactory",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Activators.ExeActivator",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Trigger.TriggerServer",
                    @"[WindowsFormsApplication3]WindowsFormsApplication3.LoginForm",
                    @"WindowsFormsApplication3.LoginForm",
                    @".?",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnWorkspaceOperations",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ReadFromFolder.DatabaseFromFolderFactory",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.Work",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnWorkspaceOperations/<>c__DisplayClass39/<>c__DisplayClass3b",
                    @"SilverlightApplication2.MainPage",
                    @"[RedGate.SQLSourceControl.CommonUI]RedGate.SQLSourceControl.CommonUI.Controls.BaseControl",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2010]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsWorkspaceOperationsBase/<>c__DisplayClass3",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Areas.Alerts.Controllers.AlertDetails2Controller",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Perfmon.Sampling.PerfSampler",
                    @"[RedGate.Reflector.Addin]RedGate.Reflector.Addin.ControlsJuggler.JumpToDefinitionJuggler",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Sql.SqlBulkCopyExtensions",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.New.Repositories.Sql.SqlDataRepository",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Sql.SqlCommandExecutor",
                    @"[RedGate.SQLSearch.Addin]RedGate.SQLSearch.Addin.Tab.Controller",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.MachineOverviewController",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnLocation",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.UnitOfWork.NHibernateUnitOfWork",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Repositories.NHibernateMonitoredEntityRepository",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Client.RpcSynchronousChannel",
                    @"System.IO.__Error",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Models.Overview.MachineOverview.MachineOverviewDataModel",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.DatabaseObjectPathUtils",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Models.Overview.SqlInstanceOverview.SqlInstanceOverviewDataModel",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Folds.FoldOps",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Areas.Configuration.Controllers.ManageMonitoredEntitiesController",
                    @"[RedGate.Update.Client]p",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Models.Overview.GlobalOverview.SqlInstanceRowModel",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.SqlInstanceOverviewController",
                    @"[RedGate.ExchangeMailboxSizer.Engine]RedGate.ExchangeMailboxSizer.Engine.DataCollection.DataCollectionProvider",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ThreeWayDiffBuilder/<>c__DisplayClass4",
                    @"N/A",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnRemoteOperations/<>c__DisplayClass1",
                    @"System.Data.ProviderBase.DbConnectionPool",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.SqlServers.SqlServerCommunicator/<>c__DisplayClass4`1",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceDataBuilder",
                    @"System.Web.Mvc.ViewResult",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.LinkedDatabaseStore",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.JobScheduler",
                    @"[RedGate.Reflector.Debugger.Engine]RedGate.Reflector.Debugger.Engine.Reflector.AssemblyReferenceDataLoader",
                    @"[RedGate.Reflector.Addin]RedGate.Reflector.Addin.Engine.DefinitionLocationStore",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Areas.Alerts.Controllers.AlertInboxController",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Configuration.BaseMonitorConnection",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Folds.FoldEvaluator`1",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Time.TimeRange",
                    @"[RedGate.LinqBridge]RedGate.Linq.Enumerable/Futures`1",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ChangeSet/<>c__DisplayClass10`1",
                    @"System.Net.Sockets.Socket",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.Machines.Registry.Managed.RegistryKeyScope/<>c__DisplayClassc",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ReadFromFolder.ScriptSynchronizationActionRewrite",
                    @"[SmartAssembly]SmartAssembly.Project",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Perfmon.Sampling.Parsing.PerfParser",
                    @"NHibernate.Transaction.AdoTransaction",
                    @"RedGate.Shared.Utils.DisposableBase",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.New.DataPresenters.Machines.SqlServers.SqlServerDataPresenter",
                    @"[Reflector]Reflector.Application.Browser.AssemblyBrowser",
                    @"[Reflector]Reflector.CodeModel.Assembly.Module",
                    @"System.Web.Util.FileUtil",
                    @"System.Web.DefaultHttpHandler",
                    @"System.Web.StaticFileHandler",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.DataPresenters.Logical.TransformDataPresenter`1/<>c__DisplayClass5",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.SqlServers.Sampler`1",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceData",
                    @"[RedGate.Response.Engine.Alerting.Base.Core]RedGate.Response.Engine.Alerting.Base.Core.AlertConfigurationRepository",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Names.QualifiedChannelName",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.Machines.Registry.Managed.RegistryKeyScope/<>c__DisplayClass5",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.New.Repositories.Sql.SqlDataRepositoryQueryGenerator",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.DataPresenters.Logical.TransformDataPresenter`1",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Models.Overview.GlobalOverview.MachineRowModel",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.KeyedCollection`1",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.DatabaseFromScriptObjectResolver",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SqlQueries",
                    @"[SmartAssembly]SmartAssembly.IL.Module",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Server.RpcSynchronousTcpServer",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Server.AsynchronousSocketListener",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.ConfigurationMonitoredServersDiagnosticController",
                    @"[RedGate.Response.Common.DomainServices]RedGate.Response.Common.DomainServices.AlertInstanceExtensions",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.NinjectExtensions.OrderedParameterKernel",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.StaticFilesController",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.DatabaseFactory",
                    @"System.Web.Mvc.Controller",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Repositories.InboxSettingsRepository",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.SqlServers.SqlServerCommunicator",
                    @"System.Web.HttpRequest",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.Machines.Registry.Managed.RegistryKeyScope",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Data.ChannelInstanceHolder`1",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.ClrMetaData.ClrAssemblyMetaData",
                    @"[RedGate.Response.UI.Website.Compiled]ASP.views_shared_alert_master",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnWorkspaceOperations/<>c__DisplayClass19",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Logs.Compressed.Log",
                    @"[{smartassembly}.ResourceResolver].",
                    @"[SmartAssembly]SmartAssembly.IL.ModuleBinaryReader",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ReflectionUtils",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Util.ElevationHelper",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnWorkspaceOperations/<>c__DisplayClass11",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.Communicators.Machines.Registry.Managed.RegistryMachineScope",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Areas.Alerts.Controllers.AlertDetailsController",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Exprs.ConstantExpr",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnWorkspaceOperations/<>c__DisplayClass31/<>c__DisplayClass33",
                    @"[RedGate.Response.Engine.Monitoring.Core]RedGate.Response.Engine.Monitoring.Core.MessageExtensionMethods",
                    @"[SmartAssembly]SmartAssembly.Helpers.EncryptionHelpers",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.Aver",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Net.Dns",
                    @"[Reflector]Reflector.Application.Languages.FSharpLanguageWriter",
                    @"[RedGate.Profiler.SharedUI]RedGate.Profiler.SharedUI.Graph.Layout.YGraphAdapter",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Attach.Attacher",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ToRetrieveChangeSet",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.LinkedDatabase",
                    @"System.Activator",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.CompareEngineUtils",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2008]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsClientUtils/<>c__DisplayClass2",
                    @"[SmartAssembly.WebService]SmartAssembly.Server.SafeConfiguration",
                    @"SmartAssembly.SmartExceptionsCore.UnhandledException",
                    @"[Reflector]Reflector.CodeModel.Assembly.MethodBody",
                    @"[RedGate.MemoryProfiler.UI]RedGate.Memory.Controller.UIControllers.ConfirmationDialogController.ConfirmationDialogController",
                    @"NAct.ProxyFactory",
                    @"[NAct]NAct.ProxyFactory",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2010]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsClientUtils/<>c__DisplayClass2",
                    @"SmartAssembly.SmartExceptionsCore.UnhandledException.",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.DatabaseHelperLiveDB",
                    @"[SmartAssembly]SmartAssembly.Data.Database",
                    @"NHibernate.Loader.Loader",
                    @"[RedGate.SQLSourceControl.CommonUI]RedGate.SQLSourceControl.CommonUI.Controls.CancellableOperationPostProcesser`2",
                    @"[RedGate.SQLSourceControl.CommonUI]RedGate.SQLSourceControl.CommonUI.ObjectFactory",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ObjectFactory",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Svn.SvnWorkspaceOperations/<>c__DisplayClass16",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.BoundDatabase",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ToRevertChangeSet/<>c__DisplayClasse",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.PageReaderFromLive.PageReaderLoader",
                    @"Microsoft.Win32.Win32Native",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Activators.IisActivator`1",
                    @"DevExpress.XtraGrid.GridControl",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.TFS.TfsLocation",
                    @"System.Net.Sockets.Socket.",
                    @"[Reflector]Reflector.Disassembler.Translator",
                    @"[RedGate.ANTSVsAddin]RedGate.ANTSVsAddin.Integration.CurrentProjectReader",
                    @"[RedGate.ANTSVsAddin]RedGate.ANTSVsAddin.CommandHandlers.ProjectProfileHelper",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.Database",
                    @"[RedGate.SQLCompare.Rewriter]RedGate.SQLCompare.Rewriter.Analysis.Analyser`1",
                    @"[RedGate.Reflector.Addin]RedGate.Reflector.Addin.ControlsJuggler.MenuJuggler",
                    @"[SmartAssembly]SmartAssembly.Utils.TheBouncer",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Sessions.IeBrowserFrontEnd",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Sessions.BaseSession`1",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.Memoization.ApproximateDirectoryCheckSum/FileInfo",
                    @"[RedGate.Profiler.UI]RedGate.Profiler.UI.Chart.PerformanceCounterGraph",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.DisplayErrorsController",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Certificate",
                    @"System.Web.Mvc.JsonResult",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ThreeWayDiffBuilder",
                    @"[Reflector]Reflector.Application.ApplicationManager",
                    @"[RedGate.Reflector.Addin]RedGate.Reflector.Addin.Gui.GoToDefinitionHijacker",
                    @"[RedGate.Profiler.UI]RedGate.Profiler.UI.MainForm",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.FullTextStopwords",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Attach.ProcessEnumerator/<get_Processes>d__0",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Functional.Option`1/PrivateNone",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Controllers.DatabaseOverviewController",
                    @"[RedGate.ANTSVsAddin]RedGate.ANTSVsAddin.Utils.ProfilerFinder",
                    @"[RedGate.Profiler.UI]RedGate.Profiler.UI.Setup.AttachSource/<get_Processes>d__0",
                    @"[RedGate.Reflector.Addin]RedGate.Reflector.Addin.Engine.ObjectBrowserReader",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2008]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsWorkspaceOperations/<>c__DisplayClass3",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Windows.Impersonation.NullImpersonator",
                    @"[RedGate.SQLCompare.Engine]RedGate.SQLCompare.Engine.DatabaseHelperResultSetDataReader",
                    @"[SmartAssembly.ReportException]SmartAssembly.ReportException.ExceptionReporting",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Startup.Activators.AttachManager",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.SrcC.Common.SrcCRemoteOperations/<>c__DisplayClass4",
                    @"[RedGate.Licensing.Client]d",
                    @"System.IO.FileStream",
                    @"[RedGate.SQLSourceControl.CommonUI]RedGate.SQLSourceControl.CommonUI.ConnectBase",
                    @"[SmartAssembly]SmartAssembly.PrepareExceptionReportHelper",
                    @"??.?",
                    @"[RedGate.Response.Common.Domain]RedGate.Response.Common.Domain.New.Names.PropertyName",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2010]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsClientUtils/<>c__DisplayClass5",
                    @"[SmartAssembly]SmartAssembly.UI.Controls.SmartPanel/Link",
                    @"[RedGate.Response.Common.Utilities]RedGate.Response.Common.Utilities.Windows.Impersonation.InteractiveOrNetOnlyImpersonator",
                    @"[RedGate.Response.UI.Website]RedGate.Response.UI.Website.Models.Overview.SideNavigationGroupModel",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.Server.RpcService",
                    @"[SmartAssembly.WebService]SmartAssembly.com.red_gate.licensing.Activation",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.Dependencies",
                    @"SharpSvn.SvnClientArgs",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2010]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsWorkspaceOperations/<>c__DisplayClass3",
                    @"[RedGate.SQLSourceControl.Engine]RedGate.SQLSourceControl.Engine.ToRetrieveChangeSet/<>c__DisplayClass1d",
                    @"System.Web.Mail.SmtpMail.LateBoundAccessHelper",
                    @"[SmartAssembly]SmartAssembly.UI.Controls.ProjectSettings",
                    @"[RedGate.Profiler.UI]RedGate.Profiler.UI.Tree.CallTree",
                    @"[RedGate.SQLSourceControl.Engine.SrcC.TFS2008]RedGate.SQLSourceControl.Engine.SrcC.TFS.Shared.TfsWorkspaceOperations/<>c__DisplayClass18/<>c__DisplayClass1a",
                    @"[RedGate.Profiler.Engine]RedGate.Profiler.Engine.Reports.Basic.Profile",
                    @"#JJb.#IJb",
                    @"[RedGate.Response.Engine.Alerting.Base.Service]RedGate.Response.Engine.Alerting.Base.Service.MonitoringAndStorageService/NHibernateRpcSession",
                    @"[RedGate.Response.Common.Networking]RedGate.Response.Common.Networking.RpcUtils",
                };

        public static IEnumerable<string> ExceptionTypes
        {
            get { return s_ExceptionTypes; }
        }

        public static IEnumerable<string> MethodNames
        {
            get { return s_MethodNames; }
        }

        public static IEnumerable<string> TypeNames
        {
            get { return s_TypeNames; }
        }

        [Test]
        [TestCaseSource("TypeNames")]
        public void GetAssemblyNameOrNull(string typeName)
        {
            string assemblyName = ReportUtils.GetAssemblyNameOrNull(typeName);
            Console.WriteLine(assemblyName);
            if (assemblyName != null)
            {
                Assert.That(assemblyName.Length, Is.GreaterThan(0).And.LessThanOrEqualTo(typeName.Length));
            }
        }

        [Test]
        [TestCaseSource("ExceptionTypes")]
        [TestCaseSource("TypeNames")]
        public void GetHumanTypeRightLength(string typeName)
        {
            string simplifiedTypeName = ReportUtils.GetHumanTypeName(typeName);
            Console.WriteLine(simplifiedTypeName);
            Assert.That(simplifiedTypeName.Length, Is.GreaterThan(0).And.LessThanOrEqualTo(typeName.Length));
        }

        [Test]
        [TestCaseSource("ExceptionTypes")]
        [TestCaseSource("TypeNames")]
        public void GetHumanTypeNameHasNoSquareBrackets(string typeName)
        {
            string simplifiedTypeName = ReportUtils.GetHumanTypeName(typeName);
            Console.WriteLine(simplifiedTypeName);
            Assert.That(simplifiedTypeName.StartsWith("[") && !simplifiedTypeName.StartsWith("[unknown"), Is.False, simplifiedTypeName + " has a [");
        }

        [Test]
        [TestCaseSource("MethodNames")]
        public void GetHumanMethodName(string methodName)
        {
            string simplifiedMethodName = ReportUtils.GetHumanMethodName(methodName);
            Console.WriteLine(simplifiedMethodName);
            Assert.That(simplifiedMethodName.Length, Is.GreaterThan(0).And.LessThanOrEqualTo(methodName.Length));
        }
    }
}
